﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<Brjostagjof_H4.Models.Entry>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">Brjóstagjöf.is</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class="main">

        <!--<div id="main-container">-->

            <h3>Greinar</h3>
            <table id="main-table">
            <tr>

                <td id="main-table-left">
                    <div class="latest-articles-container">
                    <% foreach (var entry in Model)
                        { if(entry.entry_type == 1)
                            {%>

                            <div class="latest-articles-item">
                                <div class="title"><%= Html.ActionLink(entry.title, "ViewArticle", new { id = entry.ID })%></div>
                                <div class="posted-label"><%= entry.posted %></div>
                                <div class="display-content"><%= entry.content %></div>
                             </div>

                             <%}
                        } %>
                    </div>
                </td>

                <td id="main-table-right">
                    <% Html.RenderPartial("Sidebar"); %>

                    <div class="latest-news">
                        <h3>Fréttir</h3>
                        <% foreach (var entry in Model)
                        { if(entry.entry_type == 2)
                            {%>

                            <div>
                                <div class="title"><%= Html.ActionLink(entry.title, "ViewArticle", new { id = entry.ID })%></div>
                                <div class="posted-label"><%= entry.posted %></div>
                                <div class="display-content"><%= entry.content %></div>
                            </div>

                            <%}
                        } %>
                    </div>
                </td>

            </tr>
            </table>

    </div>

    <!--</div> <!-- main div ends --> 
</asp:Content>
